{% extends 'base.html' %}

{% block title %} Sprints {% endblock %}

{% block content %}
<div class='criteria'>
	<b>Sprint Search:</b>
	<div id="sprint_search_crit">
	<form action='/sprints/' method='get'>
	
		<div><label for='id_name'>Sprint Name:</label>{{ criteria.name }}</div>
		<div><label for='id_project'>Project:</label>{{ criteria.project }}</div>	
	
		<div><input type='submit' value='Search'></div>
	</form>
	</div>
</div>

<div class='results'>
	<b>Sprints:</b>
	<table class="data-table"><tbody>
		<tr> <th>Name</th> <th>Project</th> <th>Start</th> <th>End</th> <th>View</th> <th>Edit</th> <th>Delete</th></tr>
	{% for s in sprints %}
		<tr class={% cycle '' 'alt'%}>
			<td> {{ s.name }} </td>
			<td> {{ s.project.name }} </td>
			<td> {{ s.startDate }} </td>
			<td> {{ s.endDate }} </td>
			<td> <a href='/sprint/view/{{ s.pk }}/'> View</a> </td>
			<td><a href='/sprint/edit/{{ s.pk }}/'> Edit</a> </td>
			<td><a href='/sprint/confirmdelete/{{ s.pk }}/'> Delete</a> </td>
		</tr>
	{% endfor %}
	</tbody></table>

	<div id="add_sprint"><a href="/sprint/new/">Add New Sprint</a></div>

</div>
{% endblock %}


